<nav class="navbar-default navbar-static-side" role="navigation">
    <div class="sidebar-collapse">

        <ul class="nav metismenu" id="side-menu">


            <li class="nav-header" style="padding: 0 0 30px 0">
                <nav class="navbar" role="navigation" style="margin-bottom: 0">
                    <div class="navbar-header">
                        <a class="navbar-minimalize minimalize-styl-2 btn btn-primary " href="#"><i class="fa fa-bars"></i> </a>
                    </div>
                </nav>
                <div class="dropdown profile-element text-center">
                    <a data-toggle="dropdown" class="dropdown-toggle" href="#">
                        <span>
                            <img alt="image" class="img-circle" src="<#if Session['user'].photo??>${Session['user'].photo}<#else>/images/logo.png</#if>" style="width: 48px;height: 48px;">
                             </span>

                            <span class="clear"> <span class="block m-t-xs"> <strong class="font-bold"><#if Session['user'].name??>${Session['user'].name}<#else>${Session['user'].loginname}</#if></strong>
                             </span> <span class="text-muted text-xs block">公司管理员 <b class="caret"></b></span> </span> </a>
                    <ul class="dropdown-menu animated fadeInRight m-t-xs">
                        <li><a href="/manage/user/logout">注销</a></li>
                    </ul>
                </div>
                <div class="logo-element">
                    船e行
                </div>
            </li>
<#if Session["menu"]?exists>
<#list Session["menu"] as menuItem>
   <#if menuItem.parentid == "-1">
       <#list Session["menu"] as menuItem2>
           <#if menuItem.id == menuItem2.parentid>
               <#--class="<#if menuItem2.menuActive??>${menuItem2.menuActive}<#else></#if>"-->
               <li>
                   <a href="<#if menuItem2.href??>${menuItem2.href}<#else>${ctx}/error_404</#if>"><i class="<#if menuItem2.icon??>${menuItem2.icon}<#else>fa fa-hospital-o</#if>"></i> <span class="nav-label">${menuItem2.name}</span></a>
                   <ul class="nav nav-second-level collapse">
               <#list Session["menu"] as menuItem3>
                   <#if menuItem2.id == menuItem3.parentid>
                       <#--class="<#if menuItem3.menuActive??>${menuItem3.menuActive}<#else></#if>"-->
                       <li>
                           <a class="J_menuItem"  href="<#if menuItem3.href??>${menuItem3.href}<#else>${ctx}/error_404</#if>" >${menuItem3.name}</a>
                       </li>
                   </#if>
                   </#list>
                   </ul>
               </li>
           </#if>
       </#list>
   </#if>
</#list>
</#if>
        </ul>

    </div>
</nav>